//
//  RNEventProcessorFactory.swift
//  app_rn_frontend
//
//  Created by 鱼涛 on 2017/12/12.
//  Copyright © 2017年 Facebook. All rights reserved.
//

import UIKit

@objc class EventProcessorFactory: NSObject {
  static let instance = EventProcessorFactory()
  private override init(){}
  func getProcessor(eventName :String) -> EventProcessorProtocol{
    if(eventName == "login"){
      return UserDidLoginEventProcessor.instance
    }else if(eventName == "logout"){
      return UserDidLogoutEventProcessor.instance
    }else if(eventName == "appDidEnterBackground"){
      return AppDidEnterBackgroundEventProcessor.instance
    }else if(eventName == "appStatusDidChange"){
      return AppStatusDidChangeEventProcessor.instance
    }else if(eventName == "contactListDidSync"){
      return ContactListDidSyncEventProcessor.instance
    }else if(eventName == "newMessageDidExist"){
      return NewMessageDidExistEventProcessor.instance
    }else if(eventName == "messageDidSync"){
      return MessageDidSyncEventProcessor.instance
    }else if(eventName == "groupListDidSync"){
      return GroupListDidSyncEventProcessor.instance
    }
    return EmptyProcessor.instance
  }
}

